package com.huawei.appmarket.service.appdetail.view.widget;

import android.content.Context;
import android.util.AttributeSet;
import android.util.DisplayMetrics;

import com.huawei.appgallery.foundation.ui.framework.widget.BounceViewPager;
import o.Logger;
import o.dok;

public class DetailViewPager extends BounceViewPager {
    public DetailViewPager(Context context) {
        super(context);
    }

    public DetailViewPager(Context context, AttributeSet attributeSet) {
        super(context, attributeSet);
    }

    public void onMeasure(int i, int i2) {
        try {
            DisplayMetrics ˏ = dok.ˏ(getContext());
            if (ˏ != null) {
                int size = MeasureSpec.getSize(i2);
                if (size > ˏ.heightPixels || size <= 0) {
                    i2 = MeasureSpec.makeMeasureSpec(ˏ.heightPixels, 1073741824);
                }
            }
            super.onMeasure(i, i2);
        } catch (IllegalStateException e) {
            Logger.ˋ("DetailViewPager", e.toString());
        }
    }
}
